package com.xuyiwei.xblog.business.system.service.impl;

import com.xuyiwei.xblog.business.article.result.web.input.LinkConditionVO;
import com.xuyiwei.xblog.business.system.model.Link;
import com.xuyiwei.xblog.business.system.dao.LinkMapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.xuyiwei.xblog.business.system.service.ILinkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 友情赞助 服务实现类
 * </p>
 *
 * @author xuyiwei
 * @since 2018-12-02
 */
@Service
public class LinkServiceImpl extends ServiceImpl<LinkMapper, Link> implements ILinkService {

    @Autowired
    private LinkMapper linkMapper;

    /**
     * 查询可在首页显示的友情链接列表
     *
     * @return
     */
    @Override
    public List<Link> listOfIndex() {
        LinkConditionVO vo = new LinkConditionVO(1, 1);
        List<Link> list = linkMapper.findPageByCondition(vo);
        return list;
    }

}
